﻿using UnityEngine;
using UnityEngine.UI;
using MT_ToolKit;

public class VideoCtrl : MonoBehaviour
{
    public RawImage rawimage;
    public VideoItem item;
    public Text txt;

    //AppConfig app;
    void Start()
    {
        //item = VideoManager.Instance.InitVideoItem("HistoryVideo").CreateVideoPlayer(800, 600).SetPlayeImg(rawimage);
        //item.SetPlayUrl(Application.streamingAssetsPath + "/Video/压缩冲程.mp4");
        //item.ActiveVideo(true);
        //item.SetLoop(true);
        //item.Play();
        //.SetSlider(slider)
        //    .SetRenderTexture(Screen.width, Screen.height).SetPlaySource(UnityEngine.Video.VideoSource.Url);

        //ConfigManager.Instance.LoadConfig(Application.streamingAssetsPath + "/Configs/AppConfig.json", (data) =>
        //{
        //    app = JsonMapper.ToObject<AppConfig>(data);
        //    txt.text = app.CourseCode;
        //});

        //TextAsset steInfo = Resources.Load<TextAsset>("Configs/AppConfig");
        //app = JsonUtility.FromJson<AppConfig>(steInfo.ToString());
        //txt.text = app.CourseCode;
        //http://192.168.1.192:88/mp4/M09-1317.mp4

        //Log.Info("信息");
        //"信息".Info();
        //Log.Warning("警告");
        //Log.Error("错误");
        //Log.InfoColor("信息", ColorType.灰);


        //"打印信息 黄".InfoColor(ColorType.黄);
        //"打印信息 橙".InfoColor(ColorType.橙);
    }
}

//public class AppConfig
//{
//    public string version;
//    public string serverUrl;
//    //普通版  科大版
//    public bool IsKeDaVer;
//    public bool IsTest;
//    public string HTTPURL;
//    public string HTTPURLTest;
//    public string CourseCode;
//}
